package com.gqzmy.springboot3.timer;

import cn.hutool.system.oshi.CpuInfo;
import cn.hutool.system.oshi.OshiUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author 周小哥  gqzmy@163.com 2023/1/30 20:52
 */
@Component
public class Schedule {

    public static final Logger logger = LoggerFactory.getLogger(Schedule.class);

    // @Scheduled(initialDelay = 1000L, fixedDelay = 5000)
    public void schedule() {
        CpuInfo cpuInfo = OshiUtil.getCpuInfo();
        logger.info("========================{}========================", cpuInfo);

    }
}
